package com.zhongjian.technologycal.mall.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zhongjian.technologycal.mall.R;
import com.zhongjian.technologycal.mall.activity.main.bean.CatalogBean;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

/**
 * Created by wei on 2018/4/8.
 */

public class CourseCatalogAdapter extends BaseQuickAdapter<CatalogBean,BaseViewHolder> {

    public CourseCatalogAdapter(List data) {
        super(R.layout.items_catalog_list, data);
    }

    @Override
    protected void convert(final BaseViewHolder helper, final CatalogBean item) {
        if (item == null){
            return;
        }

        int layoutPosition = helper.getLayoutPosition();
        helper.setText(R.id.catalog_tv_title,item.getNumofclass());
        helper.setText(R.id.catalog_tv_desc,item.getCatalogue());
        helper.setText(R.id.catalog_tv_time,item.getClassday());
    }

}
